from transformers import AutoModel, AutoTokenizer

# 指定模型名称
model_name = "bert-base-uncased"

# 下载模型和分词器
model = AutoModel.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# 模型会被自动缓存到本地
print("模型下载完成！")